package io.fft.flight.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Optional;

/**
 * @Author: likailun
 * @Description: 机票订单来源
 * @Date: create in 2024/8/5 21:51
 */
@Getter
@AllArgsConstructor
public enum OrderSourceEnum implements BaseEnum<String> {

    JLX("jlx", "就旅行"),
    YZL("yzl", "");

    private final String code;
    private final String message;

    public static Optional<OrderSourceEnum> getByCode(String code) {
        return Arrays.stream(OrderSourceEnum.values()).filter(item -> item.getCode().equals(code)).findAny();
    }
}
